|
LM ADD POINT LIGHT
This command adds a light that shines equally in all directions, imagine a ball of light, that can be positioned anywhere in the scene.
LM Add Point Light PosX#, PosY#, PosZ#, Radius#, Red#, Green#, Blue#
PosX#
The X position you want the light to be placed.
PosY#
The Y position you want the light to be placed.
PosZ#
The Z position you want the light to be placed.
Radius#
The maximum distance from the light position that the light can effect objects.
Red#
The red component of the light's colour, 0.0-1.0
Green#
The green component of the light's colour, 0.0-1.0
Blue#
The blue component of the light's colour, 0.0-1.0
This command does not return a value.
You can use the radius parameter to set how far the light shines, lights that shine further will be brighter than those that don't. The light will fade (attenuate) gradually from the light's position to the edge of its radius using quadratic attenuation which means that light quickly fades from the light's position and continues to the radius at a low value:

The blue line represents the intensity of the light as it fades over distance, it is at its brightest at the light position and fades to zero at the light's radius. The light colour is set using the three colour values red, green and blue, and are set as floats between 0.0 for no colour to 1.0 for full colour. This is similar to the DarkBasic RGB() command where 0 is no colour and 255 is full colour. Therefore, in this case 0,0,0 is black, 1,1,1 is white, and 0.2,0,0 is dark red. The colour values can be set above 1.0 to create a light that 'washes out' nearby objects, or below 0.0 to create a shadow light that removes light from areas it affects. The final lightmap colour will be limited to 0.0-1.0
|